
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module mwavepy.pythics_instruments.vna</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="mwavepy.html"><font color="#ffffff">mwavepy</font></a>.<a href="mwavepy.pythics_instruments.html"><font color="#ffffff">pythics_instruments</font></a>.vna</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///C:/pythonpath/mwavepy/pythics_instruments/vna.py">c:\pythonpath\mwavepy\pythics_instruments\vna.py</a></font></td></tr></table>
    <p><tt>#import&nbsp;visa</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="mwavepy.html">mwavepy</a><br>
</td><td width="25%" valign=top><a href="numpy.html">numpy</a><br>
</td><td width="25%" valign=top><a href="pythics.html">pythics</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="pythics.libinstrument.html#GPIBInstrument">pythics.libinstrument.GPIBInstrument</a>(<a href="pyvisa.visa.html#GpibInstrument">pyvisa.visa.GpibInstrument</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="mwavepy.pythics_instruments.vna.html#hp8510c">hp8510c</a>
</font></dt><dt><font face="helvetica, arial"><a href="mwavepy.pythics_instruments.vna.html#hp8720c">hp8720c</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="hp8510c">class <strong>hp8510c</strong></a>(<a href="pythics.libinstrument.html#GPIBInstrument">pythics.libinstrument.GPIBInstrument</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Virtual&nbsp;Instrument&nbsp;for&nbsp;HP8720C&nbsp;model&nbsp;VNA.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="mwavepy.pythics_instruments.vna.html#hp8510c">hp8510c</a></dd>
<dd><a href="pythics.libinstrument.html#GPIBInstrument">pythics.libinstrument.GPIBInstrument</a></dd>
<dd><a href="pyvisa.visa.html#GpibInstrument">pyvisa.visa.GpibInstrument</a></dd>
<dd><a href="pyvisa.visa.html#Instrument">pyvisa.visa.Instrument</a></dd>
<dd><a href="pyvisa.visa.html#ResourceTemplate">pyvisa.visa.ResourceTemplate</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="hp8510c-__init__"><strong>__init__</strong></a>(self, *args, **kwargs)</dt><dd><tt>default&nbsp;constructor.&nbsp;common&nbsp;options&nbsp;are&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"GPIB::$addressNumber"<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timeout=</tt></dd></dl>

<dl><dt><a name="hp8510c-getData"><strong>getData</strong></a>(self)</dt><dd><tt>returns&nbsp;output&nbsp;from&nbsp;'OUTPDATA'&nbsp;in&nbsp;array&nbsp;format</tt></dd></dl>

<dl><dt><a name="hp8510c-getError"><strong>getError</strong></a>(self)</dt><dd><tt>returns&nbsp;string,&nbsp;which&nbsp;contains&nbsp;error&nbsp;codes&nbsp;in&nbsp;the&nbsp;instrument</tt></dd></dl>

<dl><dt><a name="hp8510c-getFrequencyAxis"><strong>getFrequencyAxis</strong></a>(self, freqUnit<font color="#909090">=1000000000.0</font>)</dt><dd><tt>returns&nbsp;the&nbsp;current&nbsp;frequency&nbsp;axis.<br>
optionally&nbsp;scales&nbsp;freq&nbsp;by&nbsp;1/freqUnit</tt></dd></dl>

<dl><dt><a name="hp8510c-getS"><strong>getS</strong></a>(self, freqArray<font color="#909090">=[]</font>, z0<font color="#909090">=50</font>)</dt><dd><tt>returns&nbsp;an&nbsp;s-parameter&nbsp;type,&nbsp;which&nbsp;represents&nbsp;current&nbsp;S-param&nbsp;data,<br>
&nbsp;<br>
freqArray&nbsp;-&nbsp;is&nbsp;the&nbsp;frequency&nbsp;array&nbsp;assigned&nbsp;to&nbsp;the&nbsp;s-parameter<br>
z0&nbsp;-&nbsp;is&nbsp;the&nbsp;characteristic&nbsp;impedance&nbsp;to&nbsp;assign&nbsp;to&nbsp;the&nbsp;s-parameter</tt></dd></dl>

<dl><dt><a name="hp8510c-getTwoPort"><strong>getTwoPort</strong></a>(self, freqArray<font color="#909090">=[]</font>, z0<font color="#909090">=50</font>)</dt><dd><tt>returns&nbsp;an&nbsp;two-port&nbsp;type,&nbsp;which&nbsp;represents&nbsp;current&nbsp;DUT<br>
&nbsp;<br>
freqArray&nbsp;-&nbsp;is&nbsp;the&nbsp;frequency&nbsp;array&nbsp;assigned&nbsp;to&nbsp;the&nbsp;s-parameter<br>
z0&nbsp;-&nbsp;is&nbsp;the&nbsp;characteristic&nbsp;impedance&nbsp;to&nbsp;assign&nbsp;to&nbsp;the&nbsp;s-parameter</tt></dd></dl>

<dl><dt><a name="hp8510c-putInContSweepMode"><strong>putInContSweepMode</strong></a>(self)</dt><dd><tt>place&nbsp;machine&nbsp;back&nbsp;in&nbsp;continuous&nbsp;sweep,&nbsp;and&nbsp;local&nbsp;operation</tt></dd></dl>

<dl><dt><a name="hp8510c-putInHold"><strong>putInHold</strong></a>(self)</dt><dd><tt>put&nbsp;machine&nbsp;in&nbsp;hold&nbsp;mode&nbsp;(not&nbsp;workable&nbsp;from&nbsp;front&nbsp;panel)</tt></dd></dl>

<dl><dt><a name="hp8510c-putInSingSweepMode"><strong>putInSingSweepMode</strong></a>(self)</dt><dd><tt>place&nbsp;machine&nbsp;back&nbsp;in&nbsp;continuous&nbsp;sweep,&nbsp;and&nbsp;local&nbsp;operation</tt></dd></dl>

<dl><dt><a name="hp8510c-setDataFormatAscii"><strong>setDataFormatAscii</strong></a>(self)</dt><dd><tt>TODO:&nbsp;verify&nbsp;what&nbsp;this&nbsp;does<br>
set&nbsp;output&nbsp;data&nbsp;in&nbsp;ascii&nbsp;and&nbsp;re/im&nbsp;pairs</tt></dd></dl>

<dl><dt><a name="hp8510c-setS"><strong>setS</strong></a>(self, input)</dt><dd><tt>makes&nbsp;the&nbsp;vna&nbsp;measure&nbsp;the&nbsp;desiredS&nbsp;s-parameterS.<br>
desiredS&nbsp;-&nbsp;a&nbsp;string.&nbsp;may&nbsp;be&nbsp;either&nbsp;s11,s12,s21,&nbsp;or&nbsp;s22<br>
uses&nbsp;the&nbsp;a&nbsp;"SING;"&nbsp;command&nbsp;for&nbsp;timing</tt></dd></dl>

<hr>
Methods inherited from <a href="pythics.libinstrument.html#GPIBInstrument">pythics.libinstrument.GPIBInstrument</a>:<br>
<dl><dt><a name="hp8510c-clear_status"><strong>clear_status</strong></a>(self)</dt></dl>

<dl><dt><a name="hp8510c-reset"><strong>reset</strong></a>(self)</dt></dl>

<hr>
Data descriptors inherited from <a href="pythics.libinstrument.html#GPIBInstrument">pythics.libinstrument.GPIBInstrument</a>:<br>
<dl><dt><strong>identity</strong></dt>
</dl>
<hr>
Methods inherited from <a href="pyvisa.visa.html#GpibInstrument">pyvisa.visa.GpibInstrument</a>:<br>
<dl><dt><a name="hp8510c-__del__"><strong>__del__</strong></a>(self)</dt></dl>

<dl><dt><a name="hp8510c-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>

<dl><dt><a name="hp8510c-wait_for_srq"><strong>wait_for_srq</strong></a>(self, timeout<font color="#909090">=25</font>)</dt><dd><tt>Wait&nbsp;for&nbsp;a&nbsp;serial&nbsp;request&nbsp;(SRQ)&nbsp;coming&nbsp;from&nbsp;the&nbsp;instrument.<br>
&nbsp;<br>
Note&nbsp;that&nbsp;this&nbsp;method&nbsp;is&nbsp;not&nbsp;ended&nbsp;when&nbsp;*another*&nbsp;instrument&nbsp;signals&nbsp;an<br>
SRQ,&nbsp;only&nbsp;*this*&nbsp;instrument.<br>
&nbsp;<br>
Parameters:<br>
timeout&nbsp;--&nbsp;(optional)&nbsp;the&nbsp;maximal&nbsp;waiting&nbsp;time&nbsp;in&nbsp;seconds.&nbsp;&nbsp;The&nbsp;default<br>
&nbsp;&nbsp;&nbsp;&nbsp;value&nbsp;is&nbsp;25&nbsp;(seconds).&nbsp;&nbsp;"None"&nbsp;means&nbsp;waiting&nbsp;forever&nbsp;if&nbsp;necessary.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="pyvisa.visa.html#GpibInstrument">pyvisa.visa.GpibInstrument</a>:<br>
<dl><dt><strong>stb</strong></dt>
<dd><tt>Service&nbsp;request&nbsp;status&nbsp;register.</tt></dd>
</dl>
<hr>
Methods inherited from <a href="pyvisa.visa.html#Instrument">pyvisa.visa.Instrument</a>:<br>
<dl><dt><a name="hp8510c-ask"><strong>ask</strong></a>(self, message)</dt><dd><tt>A&nbsp;combination&nbsp;of&nbsp;<a href="#hp8510c-write">write</a>(message)&nbsp;and&nbsp;<a href="#hp8510c-read">read</a>()</tt></dd></dl>

<dl><dt><a name="hp8510c-ask_for_values"><strong>ask_for_values</strong></a>(self, message, format<font color="#909090">=None</font>)</dt><dd><tt>A&nbsp;combination&nbsp;of&nbsp;<a href="#hp8510c-write">write</a>(message)&nbsp;and&nbsp;<a href="#hp8510c-read_values">read_values</a>()</tt></dd></dl>

<dl><dt><a name="hp8510c-clear"><strong>clear</strong></a>(self)</dt><dd><tt>Resets&nbsp;the&nbsp;device.&nbsp;&nbsp;This&nbsp;operation&nbsp;is&nbsp;highly&nbsp;bus-dependent.</tt></dd></dl>

<dl><dt><a name="hp8510c-read"><strong>read</strong></a>(self)</dt><dd><tt>Read&nbsp;a&nbsp;string&nbsp;from&nbsp;the&nbsp;device.<br>
&nbsp;<br>
Reading&nbsp;stops&nbsp;when&nbsp;the&nbsp;device&nbsp;stops&nbsp;sending&nbsp;(e.g.&nbsp;by&nbsp;setting<br>
appropriate&nbsp;bus&nbsp;lines),&nbsp;or&nbsp;the&nbsp;termination&nbsp;characters&nbsp;sequence&nbsp;was<br>
detected.&nbsp;&nbsp;Attention:&nbsp;Only&nbsp;the&nbsp;last&nbsp;character&nbsp;of&nbsp;the&nbsp;termination<br>
characters&nbsp;is&nbsp;really&nbsp;used&nbsp;to&nbsp;stop&nbsp;reading,&nbsp;however,&nbsp;the&nbsp;whole&nbsp;sequence<br>
is&nbsp;compared&nbsp;to&nbsp;the&nbsp;ending&nbsp;of&nbsp;the&nbsp;read&nbsp;string&nbsp;message.&nbsp;&nbsp;If&nbsp;they&nbsp;don't<br>
match,&nbsp;a&nbsp;warning&nbsp;is&nbsp;issued.<br>
&nbsp;<br>
All&nbsp;line-ending&nbsp;characters&nbsp;are&nbsp;stripped&nbsp;from&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;string.<br>
&nbsp;<br>
Parameters:&nbsp;None<br>
&nbsp;<br>
Return&nbsp;value:<br>
The&nbsp;string&nbsp;read&nbsp;from&nbsp;the&nbsp;device.</tt></dd></dl>

<dl><dt><a name="hp8510c-read_floats"><strong>read_floats</strong></a>(self)</dt><dd><tt>This&nbsp;method&nbsp;is&nbsp;deprecated.&nbsp;&nbsp;Use&nbsp;<a href="#hp8510c-read_values">read_values</a>()&nbsp;instead.</tt></dd></dl>

<dl><dt><a name="hp8510c-read_raw"><strong>read_raw</strong></a>(self)</dt><dd><tt>Read&nbsp;the&nbsp;unmodified&nbsp;string&nbsp;sent&nbsp;from&nbsp;the&nbsp;instrument&nbsp;to&nbsp;the&nbsp;computer.<br>
&nbsp;<br>
In&nbsp;contrast&nbsp;to&nbsp;<a href="#hp8510c-read">read</a>(),&nbsp;no&nbsp;termination&nbsp;characters&nbsp;are&nbsp;checked&nbsp;or<br>
stripped.&nbsp;&nbsp;You&nbsp;get&nbsp;the&nbsp;pristine&nbsp;message.</tt></dd></dl>

<dl><dt><a name="hp8510c-read_values"><strong>read_values</strong></a>(self, format<font color="#909090">=None</font>)</dt><dd><tt>Read&nbsp;a&nbsp;list&nbsp;of&nbsp;floating&nbsp;point&nbsp;values&nbsp;from&nbsp;the&nbsp;device.<br>
&nbsp;<br>
Parameters:<br>
format&nbsp;--&nbsp;(optional)&nbsp;the&nbsp;format&nbsp;of&nbsp;the&nbsp;values.&nbsp;&nbsp;If&nbsp;given,&nbsp;it&nbsp;overrides<br>
&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;class&nbsp;attribute&nbsp;"values_format".&nbsp;&nbsp;Possible&nbsp;values&nbsp;are&nbsp;bitwise<br>
&nbsp;&nbsp;&nbsp;&nbsp;disjunctions&nbsp;of&nbsp;the&nbsp;above&nbsp;constants&nbsp;ascii,&nbsp;single,&nbsp;double,&nbsp;and<br>
&nbsp;&nbsp;&nbsp;&nbsp;big_endian.&nbsp;&nbsp;Default&nbsp;is&nbsp;ascii.<br>
&nbsp;<br>
Return&nbsp;value:<br>
The&nbsp;list&nbsp;with&nbsp;the&nbsp;read&nbsp;values.</tt></dd></dl>

<dl><dt><a name="hp8510c-trigger"><strong>trigger</strong></a>(self)</dt><dd><tt>Sends&nbsp;a&nbsp;software&nbsp;trigger&nbsp;to&nbsp;the&nbsp;device.</tt></dd></dl>

<dl><dt><a name="hp8510c-write"><strong>write</strong></a>(self, message)</dt><dd><tt>Write&nbsp;a&nbsp;string&nbsp;message&nbsp;to&nbsp;the&nbsp;device.<br>
&nbsp;<br>
Parameters:<br>
message&nbsp;--&nbsp;the&nbsp;string&nbsp;message&nbsp;to&nbsp;be&nbsp;sent.&nbsp;&nbsp;The&nbsp;term_chars&nbsp;are&nbsp;appended<br>
&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;it,&nbsp;unless&nbsp;they&nbsp;are&nbsp;already.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="pyvisa.visa.html#Instrument">pyvisa.visa.Instrument</a>:<br>
<dl><dt><strong>send_end</strong></dt>
<dd><tt>Whether&nbsp;or&nbsp;not&nbsp;to&nbsp;assert&nbsp;EOI&nbsp;(or&nbsp;something&nbsp;equivalent&nbsp;after&nbsp;each&nbsp;write<br>
operation.</tt></dd>
</dl>
<dl><dt><strong>term_chars</strong></dt>
<dd><tt>Set&nbsp;or&nbsp;read&nbsp;a&nbsp;new&nbsp;termination&nbsp;character&nbsp;sequence&nbsp;(property).<br>
&nbsp;<br>
Normally,&nbsp;you&nbsp;just&nbsp;give&nbsp;the&nbsp;new&nbsp;termination&nbsp;sequence,&nbsp;which&nbsp;is&nbsp;appended<br>
to&nbsp;each&nbsp;write&nbsp;operation&nbsp;(unless&nbsp;it's&nbsp;already&nbsp;there),&nbsp;and&nbsp;expected&nbsp;as<br>
the&nbsp;ending&nbsp;mark&nbsp;during&nbsp;each&nbsp;read&nbsp;operation.&nbsp;&nbsp;A&nbsp;typical&nbsp;example&nbsp;is&nbsp;CR+LF<br>
or&nbsp;just&nbsp;CR.&nbsp;&nbsp;If&nbsp;you&nbsp;assign&nbsp;""&nbsp;to&nbsp;this&nbsp;property,&nbsp;the&nbsp;termination<br>
sequence&nbsp;is&nbsp;deleted.<br>
&nbsp;<br>
The&nbsp;default&nbsp;is&nbsp;None,&nbsp;which&nbsp;means&nbsp;that&nbsp;CR&nbsp;is&nbsp;appended&nbsp;to&nbsp;each&nbsp;write<br>
operation&nbsp;but&nbsp;not&nbsp;expected&nbsp;after&nbsp;each&nbsp;read&nbsp;operation&nbsp;(but&nbsp;stripped&nbsp;if<br>
present).</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="pyvisa.visa.html#Instrument">pyvisa.visa.Instrument</a>:<br>
<dl><dt><strong>chunk_size</strong> = 20480</dl>

<dl><dt><strong>delay</strong> = 0.0</dl>

<dl><dt><strong>values_format</strong> = 0</dl>

<hr>
Methods inherited from <a href="pyvisa.visa.html#ResourceTemplate">pyvisa.visa.ResourceTemplate</a>:<br>
<dl><dt><a name="hp8510c-close"><strong>close</strong></a>(self)</dt><dd><tt>Closes&nbsp;the&nbsp;VISA&nbsp;session&nbsp;and&nbsp;marks&nbsp;the&nbsp;handle&nbsp;as&nbsp;invalid.<br>
&nbsp;<br>
This&nbsp;method&nbsp;can&nbsp;be&nbsp;called&nbsp;to&nbsp;ensure&nbsp;that&nbsp;all&nbsp;resources&nbsp;are&nbsp;freed.<br>
Finishing&nbsp;the&nbsp;object&nbsp;by&nbsp;__del__&nbsp;seems&nbsp;to&nbsp;work&nbsp;safely&nbsp;enough&nbsp;though.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="pyvisa.visa.html#ResourceTemplate">pyvisa.visa.ResourceTemplate</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>interface_type</strong></dt>
<dd><tt>The&nbsp;interface&nbsp;type&nbsp;of&nbsp;the&nbsp;resource&nbsp;as&nbsp;a&nbsp;number.</tt></dd>
</dl>
<dl><dt><strong>resource_class</strong></dt>
<dd><tt>The&nbsp;resource&nbsp;class&nbsp;of&nbsp;the&nbsp;resource&nbsp;as&nbsp;a&nbsp;string.</tt></dd>
</dl>
<dl><dt><strong>resource_name</strong></dt>
<dd><tt>The&nbsp;VISA&nbsp;resource&nbsp;name&nbsp;of&nbsp;the&nbsp;resource&nbsp;as&nbsp;a&nbsp;string.</tt></dd>
</dl>
<dl><dt><strong>timeout</strong></dt>
<dd><tt>The&nbsp;timeout&nbsp;in&nbsp;seconds&nbsp;for&nbsp;all&nbsp;resource&nbsp;I/O&nbsp;operations.<br>
&nbsp;<br>
Note&nbsp;that&nbsp;the&nbsp;VISA&nbsp;library&nbsp;may&nbsp;round&nbsp;up&nbsp;this&nbsp;value&nbsp;heavily.&nbsp;&nbsp;I<br>
experienced&nbsp;that&nbsp;my&nbsp;NI&nbsp;VISA&nbsp;implementation&nbsp;had&nbsp;only&nbsp;the&nbsp;values&nbsp;0,&nbsp;1,&nbsp;3<br>
and&nbsp;10&nbsp;seconds.</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="pyvisa.visa.html#ResourceTemplate">pyvisa.visa.ResourceTemplate</a>:<br>
<dl><dt><strong>vi</strong> = None</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="hp8720c">class <strong>hp8720c</strong></a>(<a href="pythics.libinstrument.html#GPIBInstrument">pythics.libinstrument.GPIBInstrument</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Virtual&nbsp;Instrument&nbsp;for&nbsp;HP8720C&nbsp;model&nbsp;VNA.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="mwavepy.pythics_instruments.vna.html#hp8720c">hp8720c</a></dd>
<dd><a href="pythics.libinstrument.html#GPIBInstrument">pythics.libinstrument.GPIBInstrument</a></dd>
<dd><a href="pyvisa.visa.html#GpibInstrument">pyvisa.visa.GpibInstrument</a></dd>
<dd><a href="pyvisa.visa.html#Instrument">pyvisa.visa.Instrument</a></dd>
<dd><a href="pyvisa.visa.html#ResourceTemplate">pyvisa.visa.ResourceTemplate</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="hp8720c-__init__"><strong>__init__</strong></a>(self, *args, **kwargs)</dt><dd><tt>default&nbsp;constructor.&nbsp;common&nbsp;options&nbsp;are&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"GPIB::$addressNumber"<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timeout=$GPIBTimeout</tt></dd></dl>

<dl><dt><a name="hp8720c-getData"><strong>getData</strong></a>(self)</dt><dd><tt>returns&nbsp;output&nbsp;from&nbsp;'OUTPDATA'&nbsp;in&nbsp;array&nbsp;format</tt></dd></dl>

<dl><dt><a name="hp8720c-getError"><strong>getError</strong></a>(self)</dt><dd><tt>returns&nbsp;string,&nbsp;which&nbsp;contains&nbsp;error&nbsp;codes&nbsp;in&nbsp;the&nbsp;instrument</tt></dd></dl>

<dl><dt><a name="hp8720c-getFrequencyAxis"><strong>getFrequencyAxis</strong></a>(self, freqUnit<font color="#909090">=1000000000.0</font>)</dt><dd><tt>returns&nbsp;the&nbsp;current&nbsp;frequency&nbsp;axis.<br>
optionally&nbsp;scales&nbsp;freq&nbsp;by&nbsp;1/freqUnit</tt></dd></dl>

<dl><dt><a name="hp8720c-getS"><strong>getS</strong></a>(self, freqArray<font color="#909090">=[]</font>, z0<font color="#909090">=50</font>)</dt><dd><tt>returns&nbsp;an&nbsp;s-parameter&nbsp;type,&nbsp;which&nbsp;represents&nbsp;current&nbsp;S-param&nbsp;data,<br>
&nbsp;<br>
freqArray&nbsp;-&nbsp;is&nbsp;the&nbsp;frequency&nbsp;array&nbsp;assigned&nbsp;to&nbsp;the&nbsp;s-parameter<br>
z0&nbsp;-&nbsp;is&nbsp;the&nbsp;characteristic&nbsp;impedance&nbsp;to&nbsp;assign&nbsp;to&nbsp;the&nbsp;s-parameter</tt></dd></dl>

<dl><dt><a name="hp8720c-getTwoPort"><strong>getTwoPort</strong></a>(self, freqArray<font color="#909090">=[]</font>, z0<font color="#909090">=50</font>)</dt><dd><tt>returns&nbsp;an&nbsp;two-port&nbsp;type,&nbsp;which&nbsp;represents&nbsp;current&nbsp;DUT<br>
&nbsp;<br>
freqArray&nbsp;-&nbsp;is&nbsp;the&nbsp;frequency&nbsp;array&nbsp;assigned&nbsp;to&nbsp;the&nbsp;s-parameter<br>
z0&nbsp;-&nbsp;is&nbsp;the&nbsp;characteristic&nbsp;impedance&nbsp;to&nbsp;assign&nbsp;to&nbsp;the&nbsp;s-parameter</tt></dd></dl>

<dl><dt><a name="hp8720c-putInContSweepMode"><strong>putInContSweepMode</strong></a>(self)</dt><dd><tt>place&nbsp;machine&nbsp;back&nbsp;in&nbsp;continuous&nbsp;sweep,&nbsp;and&nbsp;local&nbsp;operation</tt></dd></dl>

<dl><dt><a name="hp8720c-putInHold"><strong>putInHold</strong></a>(self)</dt><dd><tt>put&nbsp;machine&nbsp;in&nbsp;hold&nbsp;mode&nbsp;(not&nbsp;workable&nbsp;from&nbsp;front&nbsp;panel)</tt></dd></dl>

<dl><dt><a name="hp8720c-putInSingSweepMode"><strong>putInSingSweepMode</strong></a>(self)</dt><dd><tt>place&nbsp;machine&nbsp;back&nbsp;in&nbsp;continuous&nbsp;sweep,&nbsp;and&nbsp;local&nbsp;operation</tt></dd></dl>

<dl><dt><a name="hp8720c-setDataFormatAscii"><strong>setDataFormatAscii</strong></a>(self)</dt><dd><tt>TODO:&nbsp;verify&nbsp;what&nbsp;this&nbsp;does<br>
set&nbsp;output&nbsp;data&nbsp;in&nbsp;ascii&nbsp;and&nbsp;re/im&nbsp;pairs</tt></dd></dl>

<dl><dt><a name="hp8720c-setS"><strong>setS</strong></a>(self, input, opc<font color="#909090">=True</font>)</dt><dd><tt>makes&nbsp;the&nbsp;vna&nbsp;measure&nbsp;the&nbsp;desiredS&nbsp;s-parameterS.<br>
desiredS&nbsp;-&nbsp;a&nbsp;string.&nbsp;may&nbsp;be&nbsp;either&nbsp;s11,s12,s21,&nbsp;or&nbsp;s22<br>
opc=True/False&nbsp;&nbsp;sends&nbsp;a&nbsp;"OPC?"&nbsp;to&nbsp;vna&nbsp;after&nbsp;setting&nbsp;s-parame,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;which&nbsp;waits&nbsp;for&nbsp;it&nbsp;to&nbsp;switch,&nbsp;before&nbsp;continuing&nbsp;(doesnt&nbsp;work&nbsp;on&nbsp;8510)</tt></dd></dl>

<dl><dt><a name="hp8720c-waitOPC"><strong>waitOPC</strong></a>(self)</dt><dd><tt>waits&nbsp;for&nbsp;VNA&nbsp;to&nbsp;respond.&nbsp;usefule&nbsp;for&nbsp;timing&nbsp;things.&nbsp;&nbsp;puts&nbsp;vna&nbsp;into&nbsp;single&nbsp;sweep&nbsp;mode.&nbsp;<br>
ex:&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myVNA.__setS('s11')</tt></dd></dl>

<hr>
Methods inherited from <a href="pythics.libinstrument.html#GPIBInstrument">pythics.libinstrument.GPIBInstrument</a>:<br>
<dl><dt><a name="hp8720c-clear_status"><strong>clear_status</strong></a>(self)</dt></dl>

<dl><dt><a name="hp8720c-reset"><strong>reset</strong></a>(self)</dt></dl>

<hr>
Data descriptors inherited from <a href="pythics.libinstrument.html#GPIBInstrument">pythics.libinstrument.GPIBInstrument</a>:<br>
<dl><dt><strong>identity</strong></dt>
</dl>
<hr>
Methods inherited from <a href="pyvisa.visa.html#GpibInstrument">pyvisa.visa.GpibInstrument</a>:<br>
<dl><dt><a name="hp8720c-__del__"><strong>__del__</strong></a>(self)</dt></dl>

<dl><dt><a name="hp8720c-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>

<dl><dt><a name="hp8720c-wait_for_srq"><strong>wait_for_srq</strong></a>(self, timeout<font color="#909090">=25</font>)</dt><dd><tt>Wait&nbsp;for&nbsp;a&nbsp;serial&nbsp;request&nbsp;(SRQ)&nbsp;coming&nbsp;from&nbsp;the&nbsp;instrument.<br>
&nbsp;<br>
Note&nbsp;that&nbsp;this&nbsp;method&nbsp;is&nbsp;not&nbsp;ended&nbsp;when&nbsp;*another*&nbsp;instrument&nbsp;signals&nbsp;an<br>
SRQ,&nbsp;only&nbsp;*this*&nbsp;instrument.<br>
&nbsp;<br>
Parameters:<br>
timeout&nbsp;--&nbsp;(optional)&nbsp;the&nbsp;maximal&nbsp;waiting&nbsp;time&nbsp;in&nbsp;seconds.&nbsp;&nbsp;The&nbsp;default<br>
&nbsp;&nbsp;&nbsp;&nbsp;value&nbsp;is&nbsp;25&nbsp;(seconds).&nbsp;&nbsp;"None"&nbsp;means&nbsp;waiting&nbsp;forever&nbsp;if&nbsp;necessary.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="pyvisa.visa.html#GpibInstrument">pyvisa.visa.GpibInstrument</a>:<br>
<dl><dt><strong>stb</strong></dt>
<dd><tt>Service&nbsp;request&nbsp;status&nbsp;register.</tt></dd>
</dl>
<hr>
Methods inherited from <a href="pyvisa.visa.html#Instrument">pyvisa.visa.Instrument</a>:<br>
<dl><dt><a name="hp8720c-ask"><strong>ask</strong></a>(self, message)</dt><dd><tt>A&nbsp;combination&nbsp;of&nbsp;<a href="#hp8720c-write">write</a>(message)&nbsp;and&nbsp;<a href="#hp8720c-read">read</a>()</tt></dd></dl>

<dl><dt><a name="hp8720c-ask_for_values"><strong>ask_for_values</strong></a>(self, message, format<font color="#909090">=None</font>)</dt><dd><tt>A&nbsp;combination&nbsp;of&nbsp;<a href="#hp8720c-write">write</a>(message)&nbsp;and&nbsp;<a href="#hp8720c-read_values">read_values</a>()</tt></dd></dl>

<dl><dt><a name="hp8720c-clear"><strong>clear</strong></a>(self)</dt><dd><tt>Resets&nbsp;the&nbsp;device.&nbsp;&nbsp;This&nbsp;operation&nbsp;is&nbsp;highly&nbsp;bus-dependent.</tt></dd></dl>

<dl><dt><a name="hp8720c-read"><strong>read</strong></a>(self)</dt><dd><tt>Read&nbsp;a&nbsp;string&nbsp;from&nbsp;the&nbsp;device.<br>
&nbsp;<br>
Reading&nbsp;stops&nbsp;when&nbsp;the&nbsp;device&nbsp;stops&nbsp;sending&nbsp;(e.g.&nbsp;by&nbsp;setting<br>
appropriate&nbsp;bus&nbsp;lines),&nbsp;or&nbsp;the&nbsp;termination&nbsp;characters&nbsp;sequence&nbsp;was<br>
detected.&nbsp;&nbsp;Attention:&nbsp;Only&nbsp;the&nbsp;last&nbsp;character&nbsp;of&nbsp;the&nbsp;termination<br>
characters&nbsp;is&nbsp;really&nbsp;used&nbsp;to&nbsp;stop&nbsp;reading,&nbsp;however,&nbsp;the&nbsp;whole&nbsp;sequence<br>
is&nbsp;compared&nbsp;to&nbsp;the&nbsp;ending&nbsp;of&nbsp;the&nbsp;read&nbsp;string&nbsp;message.&nbsp;&nbsp;If&nbsp;they&nbsp;don't<br>
match,&nbsp;a&nbsp;warning&nbsp;is&nbsp;issued.<br>
&nbsp;<br>
All&nbsp;line-ending&nbsp;characters&nbsp;are&nbsp;stripped&nbsp;from&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;string.<br>
&nbsp;<br>
Parameters:&nbsp;None<br>
&nbsp;<br>
Return&nbsp;value:<br>
The&nbsp;string&nbsp;read&nbsp;from&nbsp;the&nbsp;device.</tt></dd></dl>

<dl><dt><a name="hp8720c-read_floats"><strong>read_floats</strong></a>(self)</dt><dd><tt>This&nbsp;method&nbsp;is&nbsp;deprecated.&nbsp;&nbsp;Use&nbsp;<a href="#hp8720c-read_values">read_values</a>()&nbsp;instead.</tt></dd></dl>

<dl><dt><a name="hp8720c-read_raw"><strong>read_raw</strong></a>(self)</dt><dd><tt>Read&nbsp;the&nbsp;unmodified&nbsp;string&nbsp;sent&nbsp;from&nbsp;the&nbsp;instrument&nbsp;to&nbsp;the&nbsp;computer.<br>
&nbsp;<br>
In&nbsp;contrast&nbsp;to&nbsp;<a href="#hp8720c-read">read</a>(),&nbsp;no&nbsp;termination&nbsp;characters&nbsp;are&nbsp;checked&nbsp;or<br>
stripped.&nbsp;&nbsp;You&nbsp;get&nbsp;the&nbsp;pristine&nbsp;message.</tt></dd></dl>

<dl><dt><a name="hp8720c-read_values"><strong>read_values</strong></a>(self, format<font color="#909090">=None</font>)</dt><dd><tt>Read&nbsp;a&nbsp;list&nbsp;of&nbsp;floating&nbsp;point&nbsp;values&nbsp;from&nbsp;the&nbsp;device.<br>
&nbsp;<br>
Parameters:<br>
format&nbsp;--&nbsp;(optional)&nbsp;the&nbsp;format&nbsp;of&nbsp;the&nbsp;values.&nbsp;&nbsp;If&nbsp;given,&nbsp;it&nbsp;overrides<br>
&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;class&nbsp;attribute&nbsp;"values_format".&nbsp;&nbsp;Possible&nbsp;values&nbsp;are&nbsp;bitwise<br>
&nbsp;&nbsp;&nbsp;&nbsp;disjunctions&nbsp;of&nbsp;the&nbsp;above&nbsp;constants&nbsp;ascii,&nbsp;single,&nbsp;double,&nbsp;and<br>
&nbsp;&nbsp;&nbsp;&nbsp;big_endian.&nbsp;&nbsp;Default&nbsp;is&nbsp;ascii.<br>
&nbsp;<br>
Return&nbsp;value:<br>
The&nbsp;list&nbsp;with&nbsp;the&nbsp;read&nbsp;values.</tt></dd></dl>

<dl><dt><a name="hp8720c-trigger"><strong>trigger</strong></a>(self)</dt><dd><tt>Sends&nbsp;a&nbsp;software&nbsp;trigger&nbsp;to&nbsp;the&nbsp;device.</tt></dd></dl>

<dl><dt><a name="hp8720c-write"><strong>write</strong></a>(self, message)</dt><dd><tt>Write&nbsp;a&nbsp;string&nbsp;message&nbsp;to&nbsp;the&nbsp;device.<br>
&nbsp;<br>
Parameters:<br>
message&nbsp;--&nbsp;the&nbsp;string&nbsp;message&nbsp;to&nbsp;be&nbsp;sent.&nbsp;&nbsp;The&nbsp;term_chars&nbsp;are&nbsp;appended<br>
&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;it,&nbsp;unless&nbsp;they&nbsp;are&nbsp;already.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="pyvisa.visa.html#Instrument">pyvisa.visa.Instrument</a>:<br>
<dl><dt><strong>send_end</strong></dt>
<dd><tt>Whether&nbsp;or&nbsp;not&nbsp;to&nbsp;assert&nbsp;EOI&nbsp;(or&nbsp;something&nbsp;equivalent&nbsp;after&nbsp;each&nbsp;write<br>
operation.</tt></dd>
</dl>
<dl><dt><strong>term_chars</strong></dt>
<dd><tt>Set&nbsp;or&nbsp;read&nbsp;a&nbsp;new&nbsp;termination&nbsp;character&nbsp;sequence&nbsp;(property).<br>
&nbsp;<br>
Normally,&nbsp;you&nbsp;just&nbsp;give&nbsp;the&nbsp;new&nbsp;termination&nbsp;sequence,&nbsp;which&nbsp;is&nbsp;appended<br>
to&nbsp;each&nbsp;write&nbsp;operation&nbsp;(unless&nbsp;it's&nbsp;already&nbsp;there),&nbsp;and&nbsp;expected&nbsp;as<br>
the&nbsp;ending&nbsp;mark&nbsp;during&nbsp;each&nbsp;read&nbsp;operation.&nbsp;&nbsp;A&nbsp;typical&nbsp;example&nbsp;is&nbsp;CR+LF<br>
or&nbsp;just&nbsp;CR.&nbsp;&nbsp;If&nbsp;you&nbsp;assign&nbsp;""&nbsp;to&nbsp;this&nbsp;property,&nbsp;the&nbsp;termination<br>
sequence&nbsp;is&nbsp;deleted.<br>
&nbsp;<br>
The&nbsp;default&nbsp;is&nbsp;None,&nbsp;which&nbsp;means&nbsp;that&nbsp;CR&nbsp;is&nbsp;appended&nbsp;to&nbsp;each&nbsp;write<br>
operation&nbsp;but&nbsp;not&nbsp;expected&nbsp;after&nbsp;each&nbsp;read&nbsp;operation&nbsp;(but&nbsp;stripped&nbsp;if<br>
present).</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="pyvisa.visa.html#Instrument">pyvisa.visa.Instrument</a>:<br>
<dl><dt><strong>chunk_size</strong> = 20480</dl>

<dl><dt><strong>delay</strong> = 0.0</dl>

<dl><dt><strong>values_format</strong> = 0</dl>

<hr>
Methods inherited from <a href="pyvisa.visa.html#ResourceTemplate">pyvisa.visa.ResourceTemplate</a>:<br>
<dl><dt><a name="hp8720c-close"><strong>close</strong></a>(self)</dt><dd><tt>Closes&nbsp;the&nbsp;VISA&nbsp;session&nbsp;and&nbsp;marks&nbsp;the&nbsp;handle&nbsp;as&nbsp;invalid.<br>
&nbsp;<br>
This&nbsp;method&nbsp;can&nbsp;be&nbsp;called&nbsp;to&nbsp;ensure&nbsp;that&nbsp;all&nbsp;resources&nbsp;are&nbsp;freed.<br>
Finishing&nbsp;the&nbsp;object&nbsp;by&nbsp;__del__&nbsp;seems&nbsp;to&nbsp;work&nbsp;safely&nbsp;enough&nbsp;though.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="pyvisa.visa.html#ResourceTemplate">pyvisa.visa.ResourceTemplate</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>interface_type</strong></dt>
<dd><tt>The&nbsp;interface&nbsp;type&nbsp;of&nbsp;the&nbsp;resource&nbsp;as&nbsp;a&nbsp;number.</tt></dd>
</dl>
<dl><dt><strong>resource_class</strong></dt>
<dd><tt>The&nbsp;resource&nbsp;class&nbsp;of&nbsp;the&nbsp;resource&nbsp;as&nbsp;a&nbsp;string.</tt></dd>
</dl>
<dl><dt><strong>resource_name</strong></dt>
<dd><tt>The&nbsp;VISA&nbsp;resource&nbsp;name&nbsp;of&nbsp;the&nbsp;resource&nbsp;as&nbsp;a&nbsp;string.</tt></dd>
</dl>
<dl><dt><strong>timeout</strong></dt>
<dd><tt>The&nbsp;timeout&nbsp;in&nbsp;seconds&nbsp;for&nbsp;all&nbsp;resource&nbsp;I/O&nbsp;operations.<br>
&nbsp;<br>
Note&nbsp;that&nbsp;the&nbsp;VISA&nbsp;library&nbsp;may&nbsp;round&nbsp;up&nbsp;this&nbsp;value&nbsp;heavily.&nbsp;&nbsp;I<br>
experienced&nbsp;that&nbsp;my&nbsp;NI&nbsp;VISA&nbsp;implementation&nbsp;had&nbsp;only&nbsp;the&nbsp;values&nbsp;0,&nbsp;1,&nbsp;3<br>
and&nbsp;10&nbsp;seconds.</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="pyvisa.visa.html#ResourceTemplate">pyvisa.visa.ResourceTemplate</a>:<br>
<dl><dt><strong>vi</strong> = None</dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-sleep"><strong>sleep</strong></a>(...)</dt><dd><tt><a href="#-sleep">sleep</a>(seconds)<br>
&nbsp;<br>
Delay&nbsp;execution&nbsp;for&nbsp;a&nbsp;given&nbsp;number&nbsp;of&nbsp;seconds.&nbsp;&nbsp;The&nbsp;argument&nbsp;may&nbsp;be<br>
a&nbsp;floating&nbsp;point&nbsp;number&nbsp;for&nbsp;subsecond&nbsp;precision.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>GHz</strong> = 1000000000.0</td></tr></table>
</body></html>